package com.wpml.netty.rpc;

import com.wpml.netty.rpc.service.Car;
import com.wpml.netty.rpc.service.Fly;
import com.wpml.netty.rpc.service.FlyServiceImpl;


public class RPCTest {

    public static void main(String[] args) {
        Dispatcher dis = Dispatcher.getInstance();
        dis.register(Fly.class.getName(), new FlyServiceImpl());

        Car car = ProxyFactory.getProxy(Car.class);
        String s = car.helloCar("hello car 1");
        System.out.println("car 返回值：" + s);

        Fly flyProxy = ProxyFactory.getProxy(Fly.class);
        String local = flyProxy.localMethod("local");
        System.out.println("fly 返回值： " + local);
    }


}


